//
//  OpBaseTabBarButton.m
//  LoveFreshBeeReplica
//
//  Created by skywalker on 16/12/30.
//  Copyright © 2016年 斯芬克斯. All rights reserved.
//

#import "OpBaseTabBarButton.h"

@implementation OpBaseTabBarButton

-(id)initWithFrame:(CGRect)frame{
  self= [super initWithFrame:frame];
    if (self) {
        
    }
    return self;
}
#pragma mark -重设button内部的控件的范围
- (CGRect)imageRectForContentRect:(CGRect)contentRect{
    CGFloat imageW=contentRect.size.width ;
    CGFloat imageH=contentRect.size.height * 0.8;
    return CGRectMake(0, 2, imageW, imageH);
}
-(CGRect)titleRectForContentRect:(CGRect)contentRect{
    CGFloat titleY = contentRect.size.height * 0.6;
    CGFloat titleW = contentRect.size.width;
    CGFloat titleH = contentRect.size.height - titleY;
    return CGRectMake(0, titleY, titleW, titleH);
    
}
@end
